package io.geekidea.boot.notice.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.geekidea.boot.framework.service.impl.BaseServiceImpl;
import io.geekidea.boot.notice.entity.Notice;
import io.geekidea.boot.notice.mapper.NoticeMapper;
import io.geekidea.boot.notice.query.NoticeQuery;
import io.geekidea.boot.notice.service.NoticeService;
import io.geekidea.boot.notice.vo.NoticeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = {Exception.class})
public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> implements NoticeService {

    @Autowired
    private NoticeMapper noticeMapper;

    @Override
    public Page<NoticeVo> findByPage(Page<NoticeVo> page,NoticeQuery noticeQuery) {
        return noticeMapper.getNoticesByPage(page,noticeQuery);
    }
}
